import React, { Component } from 'react'

export default class FilmItem extends Component {
  render() {
    // console.log(this.props)
    let { name, poster, grade } = this.props
    return (
      <div className='filmItem'>
        <div className='poster'>
          <img
            onClick={() => {
              this.props.clickEvent(this.props)
            }}
            src={poster}
            alt={name}
          />
        </div>
        <div className='content'>
          <h4> {name}</h4>
          <div>观众评分： {grade}</div>
        </div>
      </div>
    )
  }
}
